//
//  VCOfHomePage.m
//  07_Homework
//
//  Created by 李昊林 on 16/7/23.
//  Copyright © 2016年 李昊林. All rights reserved.
//
#import "VCOfHomePage.h"

@interface VCOfHomePage ()<UITabBarControllerDelegate>

@end

@implementation VCOfHomePage

- (void)loadView {
    [super loadView];
    NSLog(@"%s", __FUNCTION__);
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"首页" image:[UIImage imageNamed:@"10"] tag:10];
    self.tabBarItem.badgeValue = @"+3";
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kTabBar_Height)];
    [imageView setImage:[UIImage imageNamed:@"First"]];
    [self.view addSubview:imageView];
    self.tabBarController.delegate = self;
}
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController {
    viewController.tabBarItem.badgeValue = nil;
}
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"%s", __FUNCTION__);
}
- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    NSLog(@"%s", __FUNCTION__);
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
